Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cherry-pick #11769 #11899

Merged
merged 5 commits into from
Oct 22, 2024
Merged

Conversation

github-actions[bot]
Copy link
Contributor

This PR cherry-picks #11769

…11769)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
This PR will fix the mobile crash issue when user disable the blind
signing and reject the transaction in ledger devices.
This PR create a global exception handler to handle the bluetooth
relative exception throw directly from native code, which can't be
handled by our javascript code, (useLedgerBluetooth.ts has code handle
those exception but shomehow, the exception still bubble up to
`ExceptionHandler` in react native core which cause the red screen and
app crash).

The global exception will specially handle the Ledger relative exception
and stop exception bubble to react native core to stop app crash.

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Related issues**

Fixes: #11166 
#11216 

## **Manual testing steps**

1. Have Ledger with Eth app 1.11.2 installed and have eth app settings
on Ledger set to blind signing: disabled
2. Connect to [test dapp](https://metamask.github.io/test-dapp/) on MM
mobile browser
3. Scroll down to ERC1155 section and tap "deploy"
4. Note "Confirm transaction on your Ledger" shown on mobile client
5. Note error "Unexpected error occurred. An unexpected error occurred.
Please try again"
6. Note MM closes on android and presents crash error on iOS
7. 
## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBenN6Qnc9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--8d54ab43db845febde47fa78240c0aff20dbbff9/RPReplay_Final1728461873.MP4


![image](https://github.com/user-attachments/assets/bee32826-6b44-4016-94fb-d54624c992c5)

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@dawnseeker8 dawnseeker8 marked this pull request as ready for review October 21, 2024 02:26
@dawnseeker8 dawnseeker8 requested a review from a team as a code owner October 21, 2024 02:26
NicolasMassart
NicolasMassart previously approved these changes Oct 21, 2024
Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me: this cherry pick matches the original PR.

@NicolasMassart NicolasMassart added the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 21, 2024
Copy link
Contributor Author

github-actions bot commented Oct 21, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 22c7709
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c62a1abb-084c-4378-a6fd-be07a3ddf249

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@NicolasMassart NicolasMassart added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 21, 2024
@dawnseeker8 dawnseeker8 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 22, 2024
Copy link
Contributor Author

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@dawnseeker8 dawnseeker8 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 22, 2024
Copy link
Contributor Author

github-actions bot commented Oct 22, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 781fc63
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1a5c644e-2b84-4be1-bc27-74054d2bd428

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This pull request resolves the secp256k1 to the latest version as a
precaution.

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
@NicolasMassart NicolasMassart requested review from a team as code owners October 22, 2024 14:33
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/node-addon-api@5.1.0 None 0 380 kB nicknaso
npm/secp256k1@4.0.4 None +1 1.94 MB fanatid, jprichardson, null_radix

🚮 Removed packages: npm/secp256k1@4.0.3

View full report↗︎

Copy link

sonarcloud bot commented Oct 22, 2024

@dawnseeker8 dawnseeker8 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 22, 2024
Copy link
Contributor Author

github-actions bot commented Oct 22, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: e97f87f
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/5055f1b9-f7e6-451c-9521-ec7497885b52

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@NicolasMassart NicolasMassart merged commit cccb813 into release/7.34.0 Oct 22, 2024
38 checks passed
@NicolasMassart NicolasMassart deleted the chore/cherry-pick-11769 branch October 22, 2024 16:22
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
rc-cherry-picked Run Smoke E2E Triggers smoke e2e on Bitrise
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants